package Day15.ZiLian;


import java.util.Scanner;

/**
 * @author HYHwtx
 * @version 1.0
 * @date 2022/2/22 15:22
 */
public class Students extends Teachers{
    private String name2;
    private  int age2;//年龄
    private  int id;//学号
    private int nianji;//所属年级
    private  String zhuanye;//所属专业



    public Students(String name2, int age2, int id, int nianji, String zhuanye) {
        super();
        this.name2 = name2;
        this.age2 = age2;
        this.id = id;
        this.nianji = nianji;
        this.zhuanye = zhuanye;
    }


    public String getName1() {
        return name2;
    }

    public void setName1(String name1) {
        this.name2 = name1;
    }

    public int getAge1() {
        return age2;
    }

    public void setAge1(int age1) {
        this.age2 = age1;
    }

    public long getId() {
        return id;
    }

    public void setId(int id) {
        Scanner in = new Scanner(System.in);
        System.out.println("请输入学号：");
        id = in.nextInt();
    }

    public int getNianji() {
        return nianji;
    }

    public void setNianji(int nianji) {
        this.nianji = nianji;
    }

    public String getZhuanye() {
        return zhuanye;
    }

    public void setZhuanye(String zhuanye) {
        this.zhuanye = zhuanye;
    }
    public String showInfo2(){

        return   "学生姓名："+ name2 +"，年龄是："+ age2 +"，学号是："+id+"，年级是："+nianji+"，专业是："+zhuanye;
    }
}
